#!/bin/bash
toadd=`svn status | grep \? | wc -l`
if [[ "$toadd" -eq 0 ]]; then
	echo "No unversioned files found"
else
	svn status | grep '\?'
	echo "Do you want to add all these files? (y|n) : "
	read inp
	if [[ "$inp" == "y" || "$inp" == "Y" ]]; then
		for i in `svn status | awk '{if ($1 == "?") print $2}'`; do svn add $i; done
	fi
fi
